package cn.hxth.cloud.provider.handler;

import cn.hxth.cloud.api.common.constant.ProcedureStatus;
import cn.hxth.cloud.api.domain.ProductionOrder;
import cn.hxth.cloud.provider.service.ProductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class StiflingHandler extends AbstractProductionHandler {
    @Autowired
    private ProductionService productionService ;
    @Override
    protected ProductionHandlerResult doExecute(ProductionOrder productionOrder) throws Exception {
        productionOrder.setProcedureStatus(ProcedureStatus.STIFLING);
        this.productionService.updateStatus(productionOrder) ;
        return  new ProductionHandlerResult(true,false) ;
    }
}
